/**
 * Detailansicht zu einer Partei
 */
package com.sas.hnn;

import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ShowParty extends Activity {

	private static final String TAG = ShowParty.class.getSimpleName();

	private String mParty;
	private LinearLayout ll_main;
	private TextView tv_party_text;
	private Button button_ok;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Log.d(TAG, "in onCreate()");
		setContentView(R.layout.show_party);
		ll_main = (LinearLayout) findViewById(R.id.show_party);
		tv_party_text = (TextView) findViewById(R.id.party_text);

		// get Extras from Gesinnung Activity
		mParty = (savedInstanceState == null) ? null
				: (String) savedInstanceState.getSerializable(Gesinnung.PARTY);

		Log.d(TAG, "mWahl von savedInstanceState.getSerializable '" + mParty
				+ "'");
		if (mParty == null) {
			Bundle extras = getIntent().getExtras();
			mParty = extras != null ? extras.getString(Gesinnung.PARTY) : null;
		}

		Log.d(TAG, "meine Party: " + mParty);
		Resources r = getResources();
		tv_party_text.setText(r.getIdentifier(mParty, "string", "com.sas.hnn"));

		button_ok = (Button) findViewById(R.id.ok);
		button_ok.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				finish();
			}
		});

	}

	@Override
	protected void onStart() {
		super.onStart();
		Log.d(TAG, "in onStart()");
	}

	@Override
	protected void onResume() {
		super.onResume();
		Log.d(TAG, "in onResume()");
	}

	@Override
	protected void onPause() {
		super.onPause();
		Log.d(TAG, "in onPause()");
	}

	@Override
	protected void onStop() {
		super.onStop();
		Log.d(TAG, "in onStop()");
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		Log.d(TAG, "in onDestroy()");
	}

	@Override
	protected void onRestart() {
		super.onRestart();
		Log.d(TAG, "in onRestart()");
	}

	@Override
	protected void onSaveInstanceState(Bundle outState) {
	}
}
